<cfloop list="#path#" index="p">
 <cfset lastProg=-1>
<cfquery  datasource="101tf2" name="getFiles">
 
select  id,name from scan where dir like '#replace(urldecode(p),"\","\\\","ALL")#%'
 
</cfquery>
 
<cfoutput query="getFiles">

<cfprocessingdirective suppressWhiteSpace="true">

<cfset prog=(currentrow*100) / recordcount >
<cfif lastProg neq #Round(prog)#>
<script>
	top.document.getElementById("progressBar").style.width='#Round(prog)*progressWidth#px';
	top.document.getElementById("per").innerHTML='#Round(prog)#% #currentrow# of #recordcount#';
</script>
<cfflush>

</cfif>  


 
    <cfquery  datasource="101tf2" name="delTag">
    delete from scanTags where    id ='#id#'
    </cfquery>
    <cfloop from=1 to=#NumberOfVideoThumbNails# index="i">
    <cfif FileExists('#replace(VideoThumbPath,'\','\\','ALL')##id#-#i#.jpg') >
       <cffile action="delete" file="#replace(VideoThumbPath,'\','\\','ALL')##id#-#i#.jpg">
    </cfif> 
    </cfloop>
    <cfquery  datasource="101tf2" name="delData">
    delete from scan  where    id ='#id#'
    </cfquery>

 <script>
	top.document.getElementById("txt").innerHTML='Clearing data for #name#';
</script>
<cfflush>

</cfprocessingdirective>
<cfset lastProg=#Round(prog)#> 
</cfoutput>
</cfloop> 
 <script>
	top.document.getElementById("txt").innerHTML='Done!';
</script>